package io.itit.ecp.admin.server.service;

import icu.mhb.mybatisplus.plugln.base.service.JoinIService;
import io.itit.ecp.admin.server.entity.EarlyWarningEntity;
import io.itit.ecp.admin.server.entity.EarlyWarningThresholdEntity;
import io.itit.ecp.admin.server.entity.EarlyWarningUserEntity;

import java.util.List;

/**
 * <p>
 *
 * @Author：Roy
 * @Description：预警设置服务类
 * @Date：Create by 2023-12-04 15:28:53
 */
public interface IEarlyWarningService extends JoinIService<EarlyWarningEntity> {

    /**
     * 新增预警设置
     * @param earlyWarning  预警设置
     * @param userIds       推送目标IDs
     * @param thresholdJson 预警阀值及规则
     * @return
     */
    boolean saveEarlyWarning(EarlyWarningEntity earlyWarning, List<String> userIds, String thresholdJson);

    /**
     * 编辑预警设置
     * @param earlyWarning  预警设置
     * @param userIds       推送目标IDs
     * @param thresholdJson 预警阀值及规则
     * @return
     */
    boolean updateEarlyWarning(EarlyWarningEntity earlyWarning, List<String> userIds, String thresholdJson);

    List<EarlyWarningThresholdEntity> getEarlyWarningThreshold(String earlyWarningId);

    List<EarlyWarningUserEntity> getEarlyWarningUser(String earlyWarningId);
}
